.class public Lcom/arellomobile/android/push/request/RequestHelper;
.super Ljava/lang/Object;
.source "RequestHelper.java"


# static fields
.field private static final sVersionHelpers:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Lcom/arellomobile/android/push/request/versions/VersionHelper;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 33
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    .line 35
    sget-object v0, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    const-string v1, "1.1"

    new-instance v2, Lcom/arellomobile/android/push/request/versions/Version__1_2;

    invoke-direct {v2}, Lcom/arellomobile/android/push/request/versions/Version__1_2;-><init>()V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 36
    sget-object v0, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    const-string v1, "1.2"

    new-instance v2, Lcom/arellomobile/android/push/request/versions/Version__1_2;

    invoke-direct {v2}, Lcom/arellomobile/android/push/request/versions/Version__1_2;-><init>()V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 37
    sget-object v0, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    const-string v1, "1.3"

    new-instance v2, Lcom/arellomobile/android/push/request/versions/Version__1_3;

    invoke-direct {v2}, Lcom/arellomobile/android/push/request/versions/Version__1_3;-><init>()V

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 27
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 27
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getAppRemovedData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "packageName"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 104
    sget-object v1, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    invoke-interface {v1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/arellomobile/android/push/request/versions/VersionHelper;

    .line 106
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0, p1}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getAppRemovedData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getNearestZoneData(Landroid/content/Context;Landroid/location/Location;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "location"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Landroid/location/Location;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 78
    sget-object v1, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    invoke-interface {v1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/arellomobile/android/push/request/versions/VersionHelper;

    .line 80
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0, p1}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getNearestZoneData(Landroid/content/Context;Landroid/location/Location;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getPushZoneLocationFromData(Lorg/json/JSONObject;Ljava/lang/String;)Lcom/arellomobile/android/push/data/PushZoneLocation;
    .locals 2
    .parameter "resultData"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    .line 86
    sget-object v1, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    invoke-interface {v1, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/arellomobile/android/push/request/versions/VersionHelper;

    .line 88
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getPushZoneLocationFromData(Lorg/json/JSONObject;)Lcom/arellomobile/android/push/data/PushZoneLocation;

    move-result-object v1

    return-object v1
.end method

.method public static getRegistrationUnregistrationData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "deviceRegistrationID"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 43
    invoke-static {p2}, Lcom/arellomobile/android/push/request/RequestHelper;->getVersionHelper(Ljava/lang/String;)Lcom/arellomobile/android/push/request/versions/VersionHelper;

    move-result-object v0

    .line 45
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0, p1}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getRegistrationUnregistrationData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getSendAppOpenData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 64
    invoke-static {p1}, Lcom/arellomobile/android/push/request/RequestHelper;->getVersionHelper(Ljava/lang/String;)Lcom/arellomobile/android/push/request/versions/VersionHelper;

    move-result-object v0

    .line 66
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getSendAppOpenData(Landroid/content/Context;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getSendGoalAchievedData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "goal"
    .parameter "count"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 57
    invoke-static {p3}, Lcom/arellomobile/android/push/request/RequestHelper;->getVersionHelper(Ljava/lang/String;)Lcom/arellomobile/android/push/request/versions/VersionHelper;

    move-result-object v0

    .line 59
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0, p1, p2}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getSendGoalAchievedData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Integer;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getSendPushStatData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "hash"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 50
    invoke-static {p2}, Lcom/arellomobile/android/push/request/RequestHelper;->getVersionHelper(Ljava/lang/String;)Lcom/arellomobile/android/push/request/versions/VersionHelper;

    move-result-object v0

    .line 52
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0, p1}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getSendPushStatData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method public static getSendTagsData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;
    .locals 2
    .parameter "context"
    .parameter "pushVersion"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 71
    sget-object v1, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    invoke-interface {v1, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/arellomobile/android/push/request/versions/VersionHelper;

    .line 73
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    invoke-interface {v0, p0}, Lcom/arellomobile/android/push/request/versions/VersionHelper;->getSendTagsData(Landroid/content/Context;)Ljava/util/Map;

    move-result-object v1

    return-object v1
.end method

.method private static getVersionHelper(Ljava/lang/String;)Lcom/arellomobile/android/push/request/versions/VersionHelper;
    .locals 4
    .parameter "pushVersion"

    .prologue
    .line 93
    sget-object v1, Lcom/arellomobile/android/push/request/RequestHelper;->sVersionHelpers:Ljava/util/Map;

    invoke-interface {v1, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/arellomobile/android/push/request/versions/VersionHelper;

    .line 95
    .local v0, versionHelper:Lcom/arellomobile/android/push/request/versions/VersionHelper;
    if-nez v0, :cond_0

    .line 97
    new-instance v1, Ljava/lang/RuntimeException;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "No Version Request Helper sent to version \u201a\u00d1\u00f1"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 99
    :cond_0
    return-object v0
.end method
